import request from '@/utils/request'
export default {
    getList(query, size = 20, current = 1) {
        return request({
            url: `/article/advert/search`,
            method: "post",
            data: {
                ...query,
                size,
                current
            }
        })
    }
    ,
    // 新增数据
    add(data) {
        return request({
            url: `/article/advert`,
            method: 'post',
            data
        })
    },
    getById(id) {
        return request({
            url: `/article/advert/${id}`,
            method: 'get'
        })
    },
    deleteById(id) {
        return request({
        url: `/article/advert/${id}`, // 反单引号 ``
        method: 'delete', // delete 方式提交
        })
        }
        
}